laravel loop through collection

59

laravel loop through collection -

$users = App\User::where('active', 1)->get();

foreach ($users as $user) {
    echo $user->name;
}

Comments

Submit
0 Comments